package com.imc.beans;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * BlackListId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class BlackListId implements java.io.Serializable {

	// Fields

	private Integer uid;
	private Integer blackId;

	// Constructors

	/** default constructor */
	public BlackListId() {
	}

	/** full constructor */
	public BlackListId(Integer uid, Integer blackId) {
		this.uid = uid;
		this.blackId = blackId;
	}

	// Property accessors

	@Column(name = "uid", nullable = false)
	public Integer getUid() {
		return this.uid;
	}

	public void setUid(Integer uid) {
		this.uid = uid;
	}

	@Column(name = "black_id", nullable = false)
	public Integer getBlackId() {
		return this.blackId;
	}

	public void setBlackId(Integer blackId) {
		this.blackId = blackId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof BlackListId))
			return false;
		BlackListId castOther = (BlackListId) other;

		return ((this.getUid() == castOther.getUid()) || (this.getUid() != null
				&& castOther.getUid() != null && this.getUid().equals(
				castOther.getUid())))
				&& ((this.getBlackId() == castOther.getBlackId()) || (this
						.getBlackId() != null && castOther.getBlackId() != null && this
						.getBlackId().equals(castOther.getBlackId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getUid() == null ? 0 : this.getUid().hashCode());
		result = 37 * result
				+ (getBlackId() == null ? 0 : this.getBlackId().hashCode());
		return result;
	}

}